package com.download.web.controller;

import com.download.web.entity.BusArticleComment;
import com.download.web.entity.model.AddArticleCommentModel;
import com.download.web.entity.model.CommentModel;
import com.download.web.entity.model.Page;
import com.download.web.service.IBusArticleCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @description: 文章评论
 * @author: cmy
 * @create: 2019-02-21 19:45
 **/
@Controller
@RequestMapping("/articalComment")
public class ArticleCommentController {

    @Autowired
    private IBusArticleCommentService articleCommentService;

    @ResponseBody
    @PostMapping("/addComment")
    public String addComment(@RequestBody AddArticleCommentModel articleComment){
        return articleCommentService.addComment(articleComment);
    }
    @PostMapping("/delComment")
    public void delComment(Integer id){
        articleCommentService.removeById(id);
    }



}
